package conteroller

import (
	"fmt"
	"time"
)

func AutoTimIng() {
	newnow := time.Now()
	SetData := time.Date(newnow.Year(), newnow.Month(), newnow.Day(), 23, 59, 59, 0, newnow.Location())
	if newnow.After(SetData) {
		SetData = SetData.Add(20 * time.Hour)
	}
	fmt.Println("设置时间为", SetData)
	sub := SetData.Sub(newnow)
	fmt.Println("当前时间差", sub)
	timer := time.NewTimer(sub)
	fmt.Println("任务开始执行", timer)
}
